#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>

int main()
{
    int a1, a2, n;
    scanf("%d %d %d", &a1, &a2, &n);
    int arr[10000] = { 0 };
    arr[0] = a1;
    arr[1] = a2;
    int count = 0;
    int i = 0;
    while (count <= n)
    {
        int tmp = arr[i] * arr[i + 1];
        if (tmp > 9)
        {
            arr[2 + count] = tmp / 10;
            arr[3 + count] = tmp % 10;
            count += 2;
        }
        else
        {
            arr[2 + count] = tmp;
            count++;
        }
        i++;
    }
    for (i = 0; i < n; i++)
    {
        if (n - 1 == i)
        {
            printf("%d", arr[i]);
            break;
        }
        printf("%d ", arr[i]);
    }
    return 0;
}

#include<stdio.h>

int main()
{
    int N = 0;
    scanf("%d", &N);
    int min = 10000000, min_c = -1;
    int max = 0, max_c = 0;
    for (int i = 0; i < N; i++)
    {
        int tmp = 0;
        scanf("%d", &tmp);
        if (tmp == min)
            min_c++;
        if (tmp == max)
            max_c++;
        if (min > tmp)
        {
            min = tmp;
            min_c = 1;
        }
        if (max < tmp)
        {
            max = tmp;
            max_c = 1;
        }
    }
    printf("%d %d\n", min, min_c);
    printf("%d %d", max, max_c);
    return 0;
}
#include<stdio.h>

int main()
{
    int mood[24] = { 0 };
    for (int i = 0; i < 24; i++)
    {
        scanf("%d", &mood[i]);
    }
    int tmp = -1;
    scanf("%d", &tmp);
    while (tmp >= 0 && tmp <= 23)
    {
        printf("%d ", mood[tmp]);
        mood[tmp] > 50 ? printf("Yes") : printf("No");
        scanf("%d", &tmp);
        if (tmp >= 0 && tmp <= 23)
            printf("\n");
    }
    return 0;
}